Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ethersproject/networks

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethersproject/networks

Network definitions for ethers.

  • 5.7.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
774K
decreased by-14.17%
Maintainers
1
Weekly downloads
 
Created

What is @ethersproject/networks?

@ethersproject/networks is a part of the ethers.js library, which provides a collection of utilities for interacting with Ethereum networks. This package specifically deals with network configurations and provides utilities to define and work with different Ethereum networks.

What are @ethersproject/networks's main functionalities?

Get Network Information

This feature allows you to retrieve information about a specific Ethereum network by its name or chain ID. In this example, we get the network information for the 'homestead' network, which is the main Ethereum network.

const { getNetwork } = require('@ethersproject/networks');

const network = getNetwork('homestead');
console.log(network);

Define Custom Network

This feature allows you to define a custom network by specifying its name and chain ID. In this example, we create a custom network with the name 'custom' and chain ID 12345.

const { Network } = require('@ethersproject/networks');

const customNetwork = new Network('custom', 12345);
console.log(customNetwork);

Other packages similar to @ethersproject/networks

Keywords

FAQs

Package last updated on 14 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc